$OpenBSD: patch-kdecore_network_klocalsocket_unix_cpp,v 1.1 2013/04/24 19:45:29 zhuk Exp $
!!! XXX Remove later!!!


Or this "fake" length will go to bind(2), causing it fail.
--- kdecore/network/klocalsocket_unix.cpp.orig	Thu Dec 27 18:13:59 2012
+++ kdecore/network/klocalsocket_unix.cpp	Thu Dec 27 18:59:06 2012
@@ -142,7 +142,8 @@ KSockaddrUn::KSockaddrUn(const QString &path, KLocalSo
     sockaddr_un *saddr = reinterpret_cast<sockaddr_un *>(data.data());
     saddr->sun_family = AF_UNIX;
 #ifdef HAVE_STRUCT_SOCKADDR_SA_LEN
-    saddr->sun_len = datalen;
+    saddr->sun_len = (type == KLocalSocket::AbstractUnixSocket) ?
+        sizeof(saddr->sun_family) + sizeof(saddr->sun_len) : datalen;
 #endif
 
     if (type == KLocalSocket::UnixSocket) {
@@ -258,7 +259,8 @@ bool KLocalSocketServerPrivate::listen(const QString &
 
         // try to bind to the address
         localPath = path;
-        if (kBind(descriptor, addr.address(), addr.length()) == -1 ||
+        int addrlen = (aType == KLocalSocket::AbstractUnixSocket) ? MIN_SOCKADDR_UN_LEN : addr.length();
+        if (kBind(descriptor, addr.address(), addrlen) == -1 ||
             kListen(descriptor, 5) == -1) {
             int error = errno;
             close();
